
package edu.wpi.first.wpilibj.templates.commands;


/**
 *
 * @author Jaren Marler
 */
public class DoRunHopper extends CommandBase {
    private double speed;
    
    public DoRunHopper() {
         // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
        requires(myHopper);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
        // set the timeout from 0 to 5 seconds based on the joystick
        // set the speed from 0 to 1 second based on the joystick
        speed = 1.0;
        myHopper.setSpeed(speed);
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
    }
                
    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return false;
    }

    // Called once after isFinished returns true
    protected void end() {
        myHopper.setSpeed(0);
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
        end();
    }
}
